package learning.spring.helloworld;

import learning.spring.speaker.SpeakerBeanFactoryPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration// 3、发现该类是一个自动配置类，并且没有Conditional注解，说明可以立即生效
@PropertySource("classpath:/application.properties")// 加载配置文件
public class AutoConfiguration {

    /**
     * 4、实例化BeanFactoryPostProcessor对象bean
     */
    @Bean
    public static SpeakerBeanFactoryPostProcessor speakerBeanFactoryPostProcessor() {
        return new SpeakerBeanFactoryPostProcessor();
    }

}
